//
//  Brands_BrandsDetail_VC_WX.m
//  ZITHER
//
//  Created by weixin on 2019/4/11.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "Brands_BrandsDetail_VC_WX.h"
#import "Brands_BrandsDetail_Tbv_WX.h"

@interface Brands_BrandsDetail_VC_WX ()
@property (nonatomic,copy)Brands_BrandsDetail_Tbv_WX * tbv;
@end

@implementation Brands_BrandsDetail_VC_WX

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
    [self loadData];
    [self setMasonry];
}

-(void)setMasonry{
    [self.view addSubview:self.tbv];
    [self.tbv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.view).offset(NaviHeight);
        make.right.left.bottom.equalTo(self.view).offset(0);
    }];
}



-(void)loadData{
     [self rac_liftSelector:@selector(updateUIWithOneData:TwoData:) withSignalsFromArray:@[[serviceDefualt loadGoodsBrand:self.BrindId reponseObjctClass:nil],[serviceDefualt loadGoodsSeries:self.BrindId reponseObjctClass:nil]]];
}
- (void)updateUIWithOneData:(ResponseData * )oneData TwoData:(ResponseData * )twoData {
    
    //拿到数据更新UI
//    if (oneData.success) {
//        self.tbv.BFModel = oneData.responseData;
//    }
//    if (twoData.success) {
//        self.tbv.HLMode = twoData.responseData;
//    }
//    [self.tbv reloadData];
    
}



-(void)setOffsetType:(OffsetType)offsetType{
    _offsetType = offsetType;
    self.tbv.offsetType = offsetType;
}

-(Brands_BrandsDetail_Tbv_WX *)tbv{
    if (!_tbv) {
        _tbv = [[Brands_BrandsDetail_Tbv_WX alloc]initializeFrame:CGRectZero isMj:0 isEstimatedRowHeight:YES addRegisterNib:@[@"Brands_BrandsDetailHead_Cell_WX",@"Brands_BrandsDetailItem_Cell_WX"]];
    }
    return _tbv;
}

@end
